package com.czh.springboot04.service.serviceimpl;

import com.czh.springboot04.entity.ConsultLevel;
import com.czh.springboot04.mapper.ConsultLevelMapper;
import com.czh.springboot04.service.ConsultLevelService;
import com.czh.springboot04.service.ConsultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ConsultLevelServiceImpl implements ConsultLevelService {

    @Autowired
    private ConsultLevelMapper consultLevelMapper;
    @Override
    public int add(ConsultLevel consultLevel) {
        return consultLevelMapper.insert(consultLevel);
    }

    @Override
    public int edit(ConsultLevel consultLevel) {
        return consultLevelMapper.update(consultLevel);
    }

    @Override
    public int delete(int id) {
        return consultLevelMapper.delete(id);
    }

    @Override
    public ConsultLevel findById(int id) {
        return consultLevelMapper.findById(id);
    }

    @Override
    public List<ConsultLevel> findAll() {
        return consultLevelMapper.findAll();
    }
}
